﻿using UnityEngine;
using System.Collections;

public class BarUpper : MonoBehaviour {

	void OnTriggerExit2D(Collider2D other){
		if(other.gameObject.tag=="Candy"){
			other.GetComponent<CandyController>().CandyHolder.GetComponent<BoxCollider2D>().isTrigger=false;
			other.GetComponent<CandyController>().enabled=true;
			other.GetComponent<CandyController>().check=false;
			other.GetComponent<CandyController>().ClearNeighbor();
		}
	}
}
